Repository navigation
feat(cli): surface outdated CLI and skills to agents; add hyperframes update --check - #7094
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Edit accuracy: accurate 267 (base branch 267), smooth 115 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (2)
|
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 1 important · 1 nit · head fadf861
No blockers. Required CI is green on this head. The Homebrew skills-tag issue below is worth fixing before merge, because it brings back the CLI/skills mismatch that #7013 closed. Details are inline.
Scope
Read end-to-end: update.ts, upgrade.ts (upgradePlan / upgradeRunningCli), installerDetection.ts, updateCheck.ts, skillsUpdateCheck.ts, skills.ts, doctor.ts, and the cli.ts exclusion list. Checked against backgroundChecks.ts (the 1h attempt backoff also caps the new always-due case for builds newer than npm latest) and prompts.confirmationRequired (it throws, so an unattended run without --yes cannot fall through to an install). Skimmed the tests and docs. There were no prior reviews.
— Genesis
…ills count Genesis review on #7094: - `brew upgrade hyperframes` installs the formula's version, which lags npm, and exits 0 on a no-op. `update --yes` now reads the linked binary's version afterwards and installs the skills at that tag; it reports "unchanged" (or "unverified") instead of claiming npm's latest. npm, pnpm and bun pin the exact version, so they keep using it. - `_meta.skillsOutdated` is dropped once the cached count is over 24 h old, so it cannot freeze when HYPERFRAMES_NO_UPDATE_CHECK (or CI/dev) stops the background checks. — wanbi Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#7094 changes the same interval as part of updating the CLI and skills together, so this PR keeps out of it.
… update Single commit of #7094 on top of main (no merge commits through the signed GraphQL path). Includes: 2h update/skills check interval and stale-cache recheck; `_meta.checkedAt`, `_meta.skillsOutdated`, `_meta.skillsMissing`; `_meta.updateNotice`, one sentence for the agent to relay to the person, at most once a day per project (brew/npx-aware command, omitted under CI, the update-check opt-out and agent plugins); `hyperframes update [--check] [--yes] [--json]` (CLI then skills at the installed CLI's tag; brew version read back); doctor names the running binary and its channel; the hyperframes-cli skill gets one line to pass the notice on, naming no command. Keeps main's install-target skills check (#7120) in updateSkills. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
609b89e to
92d59ab
Compare
There was a problem hiding this comment.
Verdict: APPROVE · 0 open, 0 new · 00c30fb → 92d59ab (rebuilt on main)
Scope
Re-read the whole diff on the new base, including how update's skills check works alongside #7120's write-destination change. Wording check: _meta.updateNotice is addressed "For the user:", and the SKILL.md line leaves the decision to the person. If an agent runs the command anyway, update stops without --yes (exit 2) and says "Ask the person first", before it touches the network or installs anything. CI run 41770055641 is green at this head.
— Genesis
- `_meta.updateNotice` (and `update --check`'s skills command) now name a command that moves the running install: a global npm/pnpm/bun/brew CLI runs its own `hyperframes update` (or just its manager's command when only the CLI is behind), since `npx hyperframes` would run a project's copy or a fresh npx one; a project-local CLI moves with its project's manager by lockfile (`npm install`/`pnpm add`/`bun add`/`yarn add hyperframes@<v>`), which `update --yes` now names too instead of `npx hyperframes@latest`. - `update`'s confirmation hint states a fact and names no step for the agent: "Updating is the person's call; `update --check` only reports." - `upgrade --json`, `upgrade --project --json` and every `skills` JSON output leave out `_meta.updateNotice` (NO_UPDATE_NOTICE), like `update`. - dailyNotice: a null/non-object file reads as empty and is repaired; a future timestamp is stale; writes go through a 0600 tmp file + rename; withMeta never throws from the notice. - Docs: --json without --yes exits 2; plugin `update` exits 1 (plugin_managed); full `_meta` sample; per-install notice commands. `update --check` says "npm registry not reached" instead of "latest". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DeltaVerdict D5 fails any text an agent reads that tells the agent to install, update or remove skills, even when gated on the user. #7094 and #7102 fixed the update notice and skills/; the scaffolded CLAUDE.md and AGENTS.md, CLI output and the quickstart prompt still told the agent to run `skills update`. Reword them to state the fact and name the command the person runs ("For the user: ..."), matching the #7094 `_meta.updateNotice` style. The two scaffold templates stay byte-identical. No behavior changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en-com#7160) * fix(cli): address skills install and update hints to the person DeltaVerdict D5 fails any text an agent reads that tells the agent to install, update or remove skills, even when gated on the user. heygen-com#7094 and heygen-com#7102 fixed the update notice and skills/; the scaffolded CLAUDE.md and AGENTS.md, CLI output and the quickstart prompt still told the agent to run `skills update`. Reword them to state the fact and name the command the person runs ("For the user: ..."), matching the heygen-com#7094 `_meta.updateNotice` style. The two scaffold templates stay byte-identical. No behavior changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): address media-use repair and update --check hints to the person Review follow-up on heygen-com#7160. The media-use SFX repair error and its `resolve --doctor` line still told the agent to run `npx hyperframes skills update media-use`; `update --check` printed a bare `Run: <cmd>`; and the README addressed agents directly. Reword them in the "For the user:" form. The JSON `fix` field keeps the bare command. Pin the wording in tests: both scaffold templates, the stderr nudge, the `init --skip-skills` hint, the media-use error and doctor line, and the `update --check` output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to #7013. The CLI and agents now notice an outdated CLI or outdated skills, and
hyperframes update --checkreports both in one call.What
launchBackgroundChecksis unchanged.latestthat is older than the running CLI is now due for a recheck on the next run. Before this, it waited out the full interval; fix(cli): the latest version in _meta is never older than the running CLI #7049 already hid that value from_meta._metagainscheckedAt. Note: fix(cli): the latest version in _meta is never older than the running CLI #7049 chose to keep the daily cadence in this case, and this PR deliberately changes that. The 1h attempt backoff still caps how often the check retries._meta. Every--jsonoutput now carries_meta.skillsOutdated: <n>, read from the cached background skills check, so the main process makes no network call. The cache is stamped with the CLI version whose release tag it was compared against (skillsCheckedVersion). A count taken under another version is left out and rechecked. A count more than 24h old is also left out (see the Genesis fix below). Unattended runs still print nothing on stderr for outdated-only skills (fix(cli): add help [cmd], suggest the closest command or flag, and quiet the nags #6621).HYPERFRAMES_SKIP_SKILLS=1omits the field.hyperframes update [--check] [--yes] [--json]. It runs one forced check of the CLI (npm, past the cache) and of the skills (manifest at the CLI's release tag).--checkonly reports.--check, it upgrades the CLI through the same plan and argv asupgrade --yes:upgradePlanis now shared, and the installer's output goes to stderr so a--jsonstdout stays one object. It then runsupdateSkillsat the release tag of the CLI that is now installed. For npm, pnpm and bun that is the exact version they pinned. For Homebrew it is the version the linked binary reports afterbrew upgrade: the outcome isunchangedwhen the formula has not moved, andunverifiedwhen the version can't be read. In both cases the skills stay at this CLI's tag.--yesexits 2, likeupgrade.HYPERFRAMES_PLUGIN_VERSION, set byplugin-cli.mjs),updatereports but refuses to install (exit 1,plugin_managed), and skills are never touched.updateis excluded from the background-check/notice block, likeupgradeandskills.doctornames the running binary and its path: npm/pnpm/bun global, Homebrew, projectnode_modules, npx/bunx, workspace link, or plugin. Its update hint is the command for that install, for examplenpx hyperframes@latestfor npx and project-local runs (it washyperframes upgradefor everyone).upgrade's fallback for unmanaged installs also printsnpx hyperframes@latest. bunx'sbunx-*/node_modules/…layout is now recognized as ephemeral (it used to read as unknown)._meta.updateNotice: the agent relays, the person updates. When the CLI or the skills are behind, a--jsonresult carries one sentence addressed to the person, e.g. "For the user: HyperFrames CLI 0.9.8 is available (this run is 0.9.6), and 3 installed HyperFrames skills are out of date. To update both, run: npx hyperframes update".npx hyperframes update(npx hyperframes@latest updatefrom an npx run, whose cache can hold the old CLI). A Homebrew install namesbrew upgrade hyperframes, or its ownhyperframes updatewhen the skills are behind too, since an npx copy would put the skills at npm's tag rather than brew's.HYPERFRAMES_SKIP_SKILLS=1. The whole notice is left out under CI, dev,HYPERFRAMES_NO_UPDATE_CHECK=1and an agent plugin (HYPERFRAMES_PLUGIN_VERSION), and fromupdate's own output.update-notice.json;claimDailyNoticemoved toutils/dailyNotice.ts).updateAvailable,latestVersion,checkedAtand the skills counts stay on every result._meta.skillsMissing: core skills not installed, next toskillsOutdated, under the same rules (this CLI version's tag, dropped after 24h, absent underHYPERFRAMES_SKIP_SKILLS=1).skills/hyperframes-cli/SKILL.md, naming no command: "A--jsonresult may carry_meta.updateNotice: a newer HyperFrames release is out. Pass it to the person once per conversation, in your own words, at a natural pause; updating is theirs to decide." Why: no skill text tells the agent to install, update or remove skills, even gated on consent. Skill graders (e.g. DeltaVerdict D5) fail any such line as self-modification of the agent's other skills, and they read skill source, not CLI output. The command lives in the CLI's notice, for the person to run. The Upkeep row is unchanged. The hyperframes-cli size budget inscripts/check-core-skills.mjsgoes from 7168 to 7424 B for this line, andskills-manifest.jsonis regenerated.updatewording. The confirmation hint (an agent run without--yes) now reads "Ask the person first; pass --yes only when they asked to update. --check only reports."update --check's skillscommandisnpx hyperframes update, the same command_meta.updateNoticenames, so this PR recommends one command for the job.skills updatestill works.plugin-cli.mjsis unchanged: it still pins the CLI and disables the nudges.Genesis review fixes (at fadf861).
brew upgradeinstalls the formula's version (which trails npm) and exits 0 on a no-op.update --yesnow reads the installed version back and puts the skills at that tag. It no longer claims "upgraded to ".checkedAt._meta.skillsOutdatedis dropped once the cached count is over 24h old, so it can't freeze whenHYPERFRAMES_NO_UPDATE_CHECK(or CI/dev) stops the background checks.4 new tests fail at fadf861: brew stays behind npm, brew moves to an in-between version, brew's version can't be read, and a 25h-old count. A 23h-old count is still reported; that guard passes on both.
How tested
Unit tests (vitest, targeted files only, 18 files, 354 pass on the branch). 52 new or changed tests fail on main (they were run against base sources with the branch tests):
updateCheck.test,skillsUpdateCheck.test,backgroundChecks.test(plus a once-a-day-per-project guard that passes on both)checkedAtupdateCheck.test(the #7049 test now expects due=true)_meta.skillsOutdatedupdateCheck.test(count with no network call, zero),skillsUpdateCheck.test(version stamp, other-version cache, pre-stamp cache)updateupdate.test.ts, per channel through the real installer detection,upgradeplan andupdateSkills; only spawn, config, manifest and registry are stubbeddoctor.install.test.ts(10),installerDetection.test.tsrunningInstall(11)Every install channel is covered in
update.test.ts(--checkand the install path), and ininstallerDetection.test.ts/doctor.install.test.ts: npm -g, pnpm, bun, Homebrew, npx, bunx, project-local, workspace and plugin.cli.agentMode.test.tsaddsupdateto the "refuses to prompt, names --yes, exits 2" case (passes locally with bun). Lint (oxlint/oxfmt), fallow, the comment ratchet and citations, test reachability and the docs command check all pass.updateNotice/skillsMissing(at 609b89e). 14 new tests inupdateCheck.test.ts. They cover the full CLI+skills sentence; missing core skills in the skills half; a skills-only notice; the skills half dropped when none is behind and underHYPERFRAMES_SKIP_SKILLS; brew (brew upgrade hyperframes, andhyperframes updatewith skills behind); npx (@latest); absence under the update-check opt-out, CI, the plugin env, nothing behind, and{ updateNotice: false }; once a day per project with the numeric fields still present on the second result and the notice back the next day; and a daily claim kept apart from the skills nudge's.skillsMissinghas 5: reported, dropped when over a day old, taken under another version, not a count, or underHYPERFRAMES_SKIP_SKILLS. Targeted runs:updateCheck,skillsUpdateCheck,update,backgroundChecks,updateCheck.stalepin,autoUpdate.invocation,installerDetection,doctor.install(8 files, 172 pass), plus theupdatecases ofcli.agentMode.test.ts(9 pass).check-core-skills,lint-skills,check-skill-mirror,gen-skills-manifest --check, test reachability and oxlint/oxfmt on the changed files pass.Sandbox journeys, main vs branch. Each run used an isolated HOME and npm prefix/cache,
HYPERFRAMES_NO_TELEMETRY=1, andenv -i. Built bundles were laid out at each channel's real path, and two journeys used the real npm/npx installs._metanever gets latest_meta= latest 0.9.8 +checkedAtinfo --json, skills at v0.9.6 under CLI 0.9.8_metadoesn't say; stderr empty_meta.skillsOutdated: 2; stderr empty (a missing core skill still prints)update --check --jsonref v0.9.6; or 2 outdated atv0.9.8)update --yes --jsonon a realnpm i -g hyperframes@0.9.6@ v0.9.8(hyperframes-cli, media-use); stdout one JSON objectbrew upgrade hyperframes, no spawnupdate --checknames brew; explicitupdate --yescalls brewupdate --checkreportsplugin, skills skipped;update --yesexit 1plugin_manageddoctornpm-global / npx / projecthyperframes upgradefor all, no pathCLI binaryline with channel + path; hintnpm install -g hyperframes@0.9.8/npx hyperframes@latest(also via a realnpx hyperframes@0.9.6)Please don't add to the merge queue; merge after owner OK.
— wanbi
🤖 Generated with Claude Code